//==============================================================================
//
//               Copyright (C) 2005  Dick van Oudheusden
//  
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free
// Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
//==============================================================================
// 
//  $Date: 2005-10-16 05:53:25 $ $Revision: 1.9 $
//
//==============================================================================

#include <stdlib.h>

#include "ofc/config.h"

#include "ofc/DObjcTokenizer.h"

#include "ofc/DFile.h"

#include "DInc.h"
#include "DTest.h"

//-Misc------------------------------------------------------------------------

void DObjcTokenizer_test()
{
  DFile          *file   = [DFile new];
  DObjcTokenizer *tok    = [DObjcTokenizer new];
  
  [file open :"test.m" :"r"];
  
  STARTTEST();

  TEST([tok source :file :"test.m"]);
  
  TEST([tok skipWhiteSpace] == YES);
#if 0
  {
    int token = [tok nextToken];
    
    while (token != DOT_EOFF)
    {
      const char *name = NULL;
    
      if ([DObjcTokenizer isOperator :token])
        name = [DObjcTokenizer operator :token];
      else if ([DObjcTokenizer isKeyword :token])
        name = [DObjcTokenizer keyword :token];
      else if ([DObjcTokenizer isDirective :token])
        name = [DObjcTokenizer directive :token];
      else if ([DObjcTokenizer isObjcKeyword :token])
        name = [DObjcTokenizer objcKeyword :token];
      if (token != 102)
        printf("  TEST([tok nextToken] == %d); TEST(strcmp([tok text], \"%s\") == 0); // name = %s\n", token, [tok text], (name != NULL ? name : "?"));
      else
        printf("  TEST([tok nextToken] == DOT_EOFL);\n");
      token = [tok nextToken];
    }
  }
#else
  TEST([tok nextToken] == DOT_COMMENT); TEST(strcmp([tok text], "// Test file for DObjcTokenizer") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PINCLUDE); TEST(strcmp([tok text], "#include") == 0); // name = include
  TEST([tok nextToken] == DOT_STRING); TEST(strcmp([tok text], "\"objc/Object.h\"") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PIMPORT); TEST(strcmp([tok text], "#import") == 0); // name = import
  TEST([tok nextToken] == DOT_SMALLER); TEST(strcmp([tok text], "<") == 0); // name = <
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "assert") == 0); // name = ?
  TEST([tok nextToken] == DOT_FIELD); TEST(strcmp([tok text], ".") == 0); // name = .
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "h") == 0); // name = ?
  TEST([tok nextToken] == DOT_GREATER); TEST(strcmp([tok text], ">") == 0); // name = >
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PIF); TEST(strcmp([tok text], "#if") == 0); // name = if
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "_INTERFACE_") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PDEFINE); TEST(strcmp([tok text], "#define") == 0); // name = define
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "test") == 0); // name = ?
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "109") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PELIF); TEST(strcmp([tok text], "#elif") == 0); // name = elif
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "_PUBLIC_") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PDEFINE); TEST(strcmp([tok text], "#define") == 0); // name = define
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "test") == 0); // name = ?
  TEST([tok nextToken] == DOT_HEX_NUMBER); TEST(strcmp([tok text], "0x2C") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PELSE); TEST(strcmp([tok text], "#else") == 0); // name = else
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PDEFINE); TEST(strcmp([tok text], "#define") == 0); // name = define
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "test") == 0); // name = ?
  TEST([tok nextToken] == DOT_OCT_NUMBER); TEST(strcmp([tok text], "0216") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PENDIF); TEST(strcmp([tok text], "#endif") == 0); // name = endif
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PIFDEF); TEST(strcmp([tok text], "#ifdef") == 0); // name = ifdef
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "_INTERFACE_") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PDEFINE); TEST(strcmp([tok text], "#define") == 0); // name = define
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "info") == 0); // name = ?
  TEST([tok nextToken] == DOT_WIDE_STRING); TEST(strcmp([tok text], "L\"inteface\"") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PENDIF); TEST(strcmp([tok text], "#endif") == 0); // name = endif
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PIFNDEF); TEST(strcmp([tok text], "#ifndef") == 0); // name = ifndef
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "_INTERFACE_") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PDEFINE); TEST(strcmp([tok text], "#define") == 0); // name = define
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "info") == 0); // name = ?
  TEST([tok nextToken] == DOT_OBJC_STRING); TEST(strcmp([tok text], "@\"public\"") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PENDIF); TEST(strcmp([tok text], "#endif") == 0); // name = endif
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PUNDEF); TEST(strcmp([tok text], "#undef") == 0); // name = undef
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "info") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PLINE); TEST(strcmp([tok text], "#line") == 0); // name = line
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "200") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PERROR); TEST(strcmp([tok text], "#error") == 0); // name = error
  TEST([tok nextToken] == DOT_STRING); TEST(strcmp([tok text], "\"error\\\n\x1\02\a\b\f\n\r\t\vs\"") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PWARNING); TEST(strcmp([tok text], "#warning") == 0); // name = warning
  TEST([tok nextToken] == DOT_STRING); TEST(strcmp([tok text], "\"warning and concatted\"") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PASSERT); TEST(strcmp([tok text], "#assert") == 0); // name = assert
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "system") == 0); // name = ?
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "ofc") == 0); // name = ?
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PUNASSERT); TEST(strcmp([tok text], "#unassert") == 0); // name = unassert
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "system") == 0); // name = ?
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "ofc") == 0); // name = ?
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PIDENT); TEST(strcmp([tok text], "#ident") == 0); // name = ident
  TEST([tok nextToken] == DOT_STRING); TEST(strcmp([tok text], "\"ObjcTokenizer\"") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PPRAGMA); TEST(strcmp([tok text], "#pragma") == 0); // name = pragma
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "once") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_EXTERN); TEST(strcmp([tok text], "extern") == 0); // name = extern
  TEST([tok nextToken] == DOT_TSHORT); TEST(strcmp([tok text], "short") == 0); // name = short
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "sh") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_TYPEDEF); TEST(strcmp([tok text], "typedef") == 0); // name = typedef
  TEST([tok nextToken] == DOT_STRUCT); TEST(strcmp([tok text], "struct") == 0); // name = struct
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_OPEN); TEST(strcmp([tok text], "{") == 0); // name = {
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_TINT); TEST(strcmp([tok text], "int") == 0); // name = int
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "a") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_ENUM); TEST(strcmp([tok text], "enum") == 0); // name = enum
  TEST([tok nextToken] == DOT_BLOCK_OPEN); TEST(strcmp([tok text], "{") == 0); // name = {
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "e1") == 0); // name = ?
  TEST([tok nextToken] == DOT_COMMA); TEST(strcmp([tok text], ",") == 0); // name = ,
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "e2") == 0); // name = ?
  TEST([tok nextToken] == DOT_BLOCK_CLOSE); TEST(strcmp([tok text], "}") == 0); // name = }
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "b") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_UNION); TEST(strcmp([tok text], "union") == 0); // name = union
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_OPEN); TEST(strcmp([tok text], "{") == 0); // name = {
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_TINT); TEST(strcmp([tok text], "int") == 0); // name = int
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "z") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_TINT); TEST(strcmp([tok text], "int") == 0); // name = int
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "y") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_CLOSE); TEST(strcmp([tok text], "}") == 0); // name = }
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "c") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_CLOSE); TEST(strcmp([tok text], "}") == 0); // name = }
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "d") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PROTOCOL); TEST(strcmp([tok text], "@protocol") == 0); // name = protocol
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "DTestProt") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_MINUS); TEST(strcmp([tok text], "-") == 0); // name = -
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_TINT); TEST(strcmp([tok text], "int") == 0); // name = int
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "add") == 0); // name = ?
  TEST([tok nextToken] == DOT_COLON); TEST(strcmp([tok text], ":") == 0); // name = :
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_TLONG); TEST(strcmp([tok text], "long") == 0); // name = long
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "extra") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_END); TEST(strcmp([tok text], "@end") == 0); // name = end
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_INTERFACE); TEST(strcmp([tok text], "@interface") == 0); // name = interface
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "DTest") == 0); // name = ?
  TEST([tok nextToken] == DOT_COLON); TEST(strcmp([tok text], ":") == 0); // name = :
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "Object") == 0); // name = ?
  TEST([tok nextToken] == DOT_SMALLER); TEST(strcmp([tok text], "<") == 0); // name = <
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "DTestProt") == 0); // name = ?
  TEST([tok nextToken] == DOT_GREATER); TEST(strcmp([tok text], ">") == 0); // name = >
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_OPEN); TEST(strcmp([tok text], "{") == 0); // name = {
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PRIVATE); TEST(strcmp([tok text], "@private") == 0); // name = private
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_TINT); TEST(strcmp([tok text], "int") == 0); // name = int
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "_int") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PROTECTED); TEST(strcmp([tok text], "@protected") == 0); // name = protected
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_TINT); TEST(strcmp([tok text], "int") == 0); // name = int
  TEST([tok nextToken] == DOT_STAR); TEST(strcmp([tok text], "*") == 0); // name = *
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "_pntr") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PUBLIC); TEST(strcmp([tok text], "@public") == 0); // name = public
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_TINT); TEST(strcmp([tok text], "int") == 0); // name = int
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "_public") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_CLOSE); TEST(strcmp([tok text], "}") == 0); // name = }
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_MINUS); TEST(strcmp([tok text], "-") == 0); // name = -
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "DTest") == 0); // name = ?
  TEST([tok nextToken] == DOT_STAR); TEST(strcmp([tok text], "*") == 0); // name = *
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "init") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_MINUS); TEST(strcmp([tok text], "-") == 0); // name = -
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_TINT); TEST(strcmp([tok text], "int") == 0); // name = int
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "add") == 0); // name = ?
  TEST([tok nextToken] == DOT_COLON); TEST(strcmp([tok text], ":") == 0); // name = :
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_TLONG); TEST(strcmp([tok text], "long") == 0); // name = long
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "extra") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PLUS); TEST(strcmp([tok text], "+") == 0); // name = +
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_TINT); TEST(strcmp([tok text], "int") == 0); // name = int
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "sum") == 0); // name = ?
  TEST([tok nextToken] == DOT_COLON); TEST(strcmp([tok text], ":") == 0); // name = :
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_TLONG); TEST(strcmp([tok text], "long") == 0); // name = long
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "extra") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_END); TEST(strcmp([tok text], "@end") == 0); // name = end
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IMPLEMENTATION); TEST(strcmp([tok text], "@implementation") == 0); // name = implementation
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "DTest") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_MINUS); TEST(strcmp([tok text], "-") == 0); // name = -
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "DTest") == 0); // name = ?
  TEST([tok nextToken] == DOT_STAR); TEST(strcmp([tok text], "*") == 0); // name = *
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "init") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_OPEN); TEST(strcmp([tok text], "{") == 0); // name = {
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_TCHAR); TEST(strcmp([tok text], "char") == 0); // name = char
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "ch") == 0); // name = ?
  TEST([tok nextToken] == DOT_ASSIGNMENT); TEST(strcmp([tok text], "=") == 0); // name = =
  TEST([tok nextToken] == DOT_CHAR); TEST(strcmp([tok text], "'\xd'") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_AUTO); TEST(strcmp([tok text], "auto") == 0); // name = auto
  TEST([tok nextToken] == DOT_TDOUBLE); TEST(strcmp([tok text], "double") == 0); // name = double
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "db") == 0); // name = ?
  TEST([tok nextToken] == DOT_ASSIGNMENT); TEST(strcmp([tok text], "=") == 0); // name = =
  TEST([tok nextToken] == DOT_FLP_NUMBER); TEST(strcmp([tok text], ".32e-7l") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_STATIC); TEST(strcmp([tok text], "static") == 0); // name = static
  TEST([tok nextToken] == DOT_TFLOAT); TEST(strcmp([tok text], "float") == 0); // name = float
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "fl") == 0); // name = ?
  TEST([tok nextToken] == DOT_ASSIGNMENT); TEST(strcmp([tok text], "=") == 0); // name = =
  TEST([tok nextToken] == DOT_MINUS); TEST(strcmp([tok text], "-") == 0); // name = -
  TEST([tok nextToken] == DOT_FLP_NUMBER); TEST(strcmp([tok text], "072.0") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_REGISTER); TEST(strcmp([tok text], "register") == 0); // name = register
  TEST([tok nextToken] == DOT_TINT); TEST(strcmp([tok text], "int") == 0); // name = int
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_ASSIGNMENT); TEST(strcmp([tok text], "=") == 0); // name = =
  TEST([tok nextToken] == DOT_OCT_NUMBER); TEST(strcmp([tok text], "0666") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_VOLATILE); TEST(strcmp([tok text], "volatile") == 0); // name = volatile
  TEST([tok nextToken] == DOT_TLONG); TEST(strcmp([tok text], "long") == 0); // name = long
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "lg") == 0); // name = ?
  TEST([tok nextToken] == DOT_ASSIGNMENT); TEST(strcmp([tok text], "=") == 0); // name = =
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "122131L") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_CONST); TEST(strcmp([tok text], "const") == 0); // name = const
  TEST([tok nextToken] == DOT_TUNSIGNED); TEST(strcmp([tok text], "unsigned") == 0); // name = unsigned
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "un") == 0); // name = ?
  TEST([tok nextToken] == DOT_ASSIGNMENT); TEST(strcmp([tok text], "=") == 0); // name = =
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "90u") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_SBRACKET_OPEN); TEST(strcmp([tok text], "[") == 0); // name = [
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "super") == 0); // name = ?
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "init") == 0); // name = ?
  TEST([tok nextToken] == DOT_SBRACKET_CLOSE); TEST(strcmp([tok text], "]") == 0); // name = ]
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_FOR); TEST(strcmp([tok text], "for") == 0); // name = for
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_ASSIGNMENT); TEST(strcmp([tok text], "=") == 0); // name = =
  TEST([tok nextToken] == DOT_OCT_NUMBER); TEST(strcmp([tok text], "0") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_SMALLER); TEST(strcmp([tok text], "<") == 0); // name = <
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "4") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_INCREMENT); TEST(strcmp([tok text], "++") == 0); // name = ++
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_OPEN); TEST(strcmp([tok text], "{") == 0); // name = {
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_SWITCH); TEST(strcmp([tok text], "switch") == 0); // name = switch
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "ch") == 0); // name = ?
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_OPEN); TEST(strcmp([tok text], "{") == 0); // name = {
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_CASE); TEST(strcmp([tok text], "case") == 0); // name = case
  TEST([tok nextToken] == DOT_CHAR); TEST(strcmp([tok text], "'\07'") == 0); // name = ?
  TEST([tok nextToken] == DOT_COLON); TEST(strcmp([tok text], ":") == 0); // name = :
  TEST([tok nextToken] == DOT_BREAK); TEST(strcmp([tok text], "break") == 0); // name = break
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_DEFAULT); TEST(strcmp([tok text], "default") == 0); // name = default
  TEST([tok nextToken] == DOT_COLON); TEST(strcmp([tok text], ":") == 0); // name = :
  TEST([tok nextToken] == DOT_GOTO); TEST(strcmp([tok text], "goto") == 0); // name = goto
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "label") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_CLOSE); TEST(strcmp([tok text], "}") == 0); // name = }
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IF); TEST(strcmp([tok text], "if") == 0); // name = if
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "fl") == 0); // name = ?
  TEST([tok nextToken] == DOT_NOT_EQUAL); TEST(strcmp([tok text], "!=") == 0); // name = !=
  TEST([tok nextToken] == DOT_FLP_NUMBER); TEST(strcmp([tok text], ".34") == 0); // name = ?
  TEST([tok nextToken] == DOT_AND); TEST(strcmp([tok text], "&&") == 0); // name = &&
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "db") == 0); // name = ?
  TEST([tok nextToken] == DOT_GREATER); TEST(strcmp([tok text], ">") == 0); // name = >
  TEST([tok nextToken] == DOT_MINUS); TEST(strcmp([tok text], "-") == 0); // name = -
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "2") == 0); // name = ?
  TEST([tok nextToken] == DOT_OR); TEST(strcmp([tok text], "||") == 0); // name = ||
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "lg") == 0); // name = ?
  TEST([tok nextToken] == DOT_GREATER_EQUAL); TEST(strcmp([tok text], ">=") == 0); // name = >=
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "12") == 0); // name = ?
  TEST([tok nextToken] == DOT_AND); TEST(strcmp([tok text], "&&") == 0); // name = &&
  TEST([tok nextToken] == DOT_NOT); TEST(strcmp([tok text], "!") == 0); // name = !
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "un") == 0); // name = ?
  TEST([tok nextToken] == DOT_EQUAL); TEST(strcmp([tok text], "==") == 0); // name = ==
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "100L") == 0); // name = ?
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "db") == 0); // name = ?
  TEST([tok nextToken] == DOT_PLUS_ASSIGNMENT); TEST(strcmp([tok text], "+=") == 0); // name = +=
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "fl") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_ELSE); TEST(strcmp([tok text], "else") == 0); // name = else
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_OPEN); TEST(strcmp([tok text], "{") == 0); // name = {
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "lg") == 0); // name = ?
  TEST([tok nextToken] == DOT_LEFT_ASSIGNMENT); TEST(strcmp([tok text], "<<=") == 0); // name = <<=
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_CONTINUE); TEST(strcmp([tok text], "continue") == 0); // name = continue
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_CLOSE); TEST(strcmp([tok text], "}") == 0); // name = }
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_CLOSE); TEST(strcmp([tok text], "}") == 0); // name = }
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_ASSIGNMENT); TEST(strcmp([tok text], "=") == 0); // name = =
  TEST([tok nextToken] == DOT_WIDE_CHAR); TEST(strcmp([tok text], "L'5'") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_DO); TEST(strcmp([tok text], "do") == 0); // name = do
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_OPEN); TEST(strcmp([tok text], "{") == 0); // name = {
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_DECREMENT); TEST(strcmp([tok text], "--") == 0); // name = --
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_CLOSE); TEST(strcmp([tok text], "}") == 0); // name = }
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_WHILE); TEST(strcmp([tok text], "while") == 0); // name = while
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_SMALLER_EQUAL); TEST(strcmp([tok text], "<=") == 0); // name = <=
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "4") == 0); // name = ?
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "label") == 0); // name = ?
  TEST([tok nextToken] == DOT_COLON); TEST(strcmp([tok text], ":") == 0); // name = :
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_PLUS_ASSIGNMENT); TEST(strcmp([tok text], "+=") == 0); // name = +=
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "4") == 0); // name = ?
  TEST([tok nextToken] == DOT_BIT_AND); TEST(strcmp([tok text], "&") == 0); // name = &
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "5") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_MINUS_ASSIGNMENT); TEST(strcmp([tok text], "-=") == 0); // name = -=
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "4") == 0); // name = ?
  TEST([tok nextToken] == DOT_BIT_OR); TEST(strcmp([tok text], "|") == 0); // name = |
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "5") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_MULT_ASSIGNMENT); TEST(strcmp([tok text], "*=") == 0); // name = *=
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "4") == 0); // name = ?
  TEST([tok nextToken] == DOT_BIT_XOR); TEST(strcmp([tok text], "^") == 0); // name = ^
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "5") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_DIV_ASSIGNMENT); TEST(strcmp([tok text], "/=") == 0); // name = /=
  TEST([tok nextToken] == DOT_BIT_NOT); TEST(strcmp([tok text], "~") == 0); // name = ~
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "4") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_REM_ASSIGNMENT); TEST(strcmp([tok text], "%=") == 0); // name = %=
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "25") == 0); // name = ?
  TEST([tok nextToken] == DOT_BIT_RIGHT); TEST(strcmp([tok text], ">>") == 0); // name = >>
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "4") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_RIGHT_ASSIGNMENT); TEST(strcmp([tok text], ">>=") == 0); // name = >>=
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "5") == 0); // name = ?
  TEST([tok nextToken] == DOT_BIT_LEFT); TEST(strcmp([tok text], "<<") == 0); // name = <<
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "1") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_LEFT_ASSIGNMENT); TEST(strcmp([tok text], "<<=") == 0); // name = <<=
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "5") == 0); // name = ?
  TEST([tok nextToken] == DOT_PLUS); TEST(strcmp([tok text], "+") == 0); // name = +
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "4") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_AND_ASSIGNMENT); TEST(strcmp([tok text], "&=") == 0); // name = &=
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "5") == 0); // name = ?
  TEST([tok nextToken] == DOT_MINUS); TEST(strcmp([tok text], "-") == 0); // name = -
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "4") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_OR_ASSIGNMENT); TEST(strcmp([tok text], "|=") == 0); // name = |=
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "5") == 0); // name = ?
  TEST([tok nextToken] == DOT_STAR); TEST(strcmp([tok text], "*") == 0); // name = *
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "4") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_XOR_ASSIGNMENT); TEST(strcmp([tok text], "^=") == 0); // name = ^=
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "5") == 0); // name = ?
  TEST([tok nextToken] == DOT_REMAINDER); TEST(strcmp([tok text], "%") == 0); // name = %
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "4") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "it") == 0); // name = ?
  TEST([tok nextToken] == DOT_ASSIGNMENT); TEST(strcmp([tok text], "=") == 0); // name = =
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "5") == 0); // name = ?
  TEST([tok nextToken] == DOT_DIVISION); TEST(strcmp([tok text], "/") == 0); // name = /
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "4") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_SBRACKET_OPEN); TEST(strcmp([tok text], "[") == 0); // name = [
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "self") == 0); // name = ?
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "add") == 0); // name = ?
  TEST([tok nextToken] == DOT_COLON); TEST(strcmp([tok text], ":") == 0); // name = :
  TEST([tok nextToken] == DOT_DEC_NUMBER); TEST(strcmp([tok text], "4") == 0); // name = ?
  TEST([tok nextToken] == DOT_SBRACKET_CLOSE); TEST(strcmp([tok text], "]") == 0); // name = ]
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_RETURN); TEST(strcmp([tok text], "return") == 0); // name = return
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "self") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_CLOSE); TEST(strcmp([tok text], "}") == 0); // name = }
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_MINUS); TEST(strcmp([tok text], "-") == 0); // name = -
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_TINT); TEST(strcmp([tok text], "int") == 0); // name = int
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "add") == 0); // name = ?
  TEST([tok nextToken] == DOT_COLON); TEST(strcmp([tok text], ":") == 0); // name = :
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_TLONG); TEST(strcmp([tok text], "long") == 0); // name = long
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "extra") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_OPEN); TEST(strcmp([tok text], "{") == 0); // name = {
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "SEL") == 0); // name = ?
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "sel") == 0); // name = ?
  TEST([tok nextToken] == DOT_ASSIGNMENT); TEST(strcmp([tok text], "=") == 0); // name = =
  TEST([tok nextToken] == DOT_SELECTOR); TEST(strcmp([tok text], "@selector") == 0); // name = selector
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "add") == 0); // name = ?
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "_int") == 0); // name = ?
  TEST([tok nextToken] == DOT_ASSIGNMENT); TEST(strcmp([tok text], "=") == 0); // name = =
  TEST([tok nextToken] == DOT_SIZEOF); TEST(strcmp([tok text], "sizeof") == 0); // name = ?
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "sel") == 0); // name = ?
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "_pntr") == 0); // name = ?
  TEST([tok nextToken] == DOT_ASSIGNMENT); TEST(strcmp([tok text], "=") == 0); // name = =
  TEST([tok nextToken] == DOT_BIT_AND); TEST(strcmp([tok text], "&") == 0); // name = &
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "_int") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_RETURN); TEST(strcmp([tok text], "return") == 0); // name = return
  TEST([tok nextToken] == DOT_STAR); TEST(strcmp([tok text], "*") == 0); // name = *
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "_pntr") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_CLOSE); TEST(strcmp([tok text], "}") == 0); // name = }
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_PLUS); TEST(strcmp([tok text], "+") == 0); // name = +
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_TINT); TEST(strcmp([tok text], "int") == 0); // name = int
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "sum") == 0); // name = ?
  TEST([tok nextToken] == DOT_COLON); TEST(strcmp([tok text], ":") == 0); // name = :
  TEST([tok nextToken] == DOT_RBRACKET_OPEN); TEST(strcmp([tok text], "(") == 0); // name = (
  TEST([tok nextToken] == DOT_TLONG); TEST(strcmp([tok text], "long") == 0); // name = long
  TEST([tok nextToken] == DOT_RBRACKET_CLOSE); TEST(strcmp([tok text], ")") == 0); // name = )
  TEST([tok nextToken] == DOT_IDENTIFIER); TEST(strcmp([tok text], "extra") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_OPEN); TEST(strcmp([tok text], "{") == 0); // name = {
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_RETURN); TEST(strcmp([tok text], "return") == 0); // name = return
  TEST([tok nextToken] == DOT_OCT_NUMBER); TEST(strcmp([tok text], "0") == 0); // name = ?
  TEST([tok nextToken] == DOT_SEMI_COLON); TEST(strcmp([tok text], ";") == 0); // name = ;
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_BLOCK_CLOSE); TEST(strcmp([tok text], "}") == 0); // name = }
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_END); TEST(strcmp([tok text], "@end") == 0); // name = end
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_COMMENT); TEST(strcmp([tok text], "/*==========================================================================*/") == 0); // name = ?
  TEST([tok nextToken] == DOT_EOFL);
  TEST([tok nextToken] == DOT_EOFF);
#endif
  
  [tok free];
  
  [file free];
    
  STOPTEST();
}

